import 'lib_wake_lock_platform_interface.dart';

class LibWakeLock {
  //单例
  static LibWakeLock? _instance;

  static LibWakeLock get instance => _instance ??= LibWakeLock._();

  LibWakeLock._();

  Future<String?> getPlatformVersion() {
    return LibWakeLockPlatform.instance.getPlatformVersion();
  }

  //设置常亮
  void enable() {
    LibWakeLockPlatform.instance.invokeMethod("enable");
  }

  //关闭常亮
  void disable() {
    LibWakeLockPlatform.instance.invokeMethod("disable");
  }
}
